/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       summoning_spell.h

	$Header: /game/summoning_spell.h $

	$NoKeywords: $

 ************************************************************************/

#ifndef SUMMONING_SPELL_H_INCLUDED
#define SUMMONING_SPELL_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "combat_creature_ptr.h"
#include "combat_spell.h"

enum t_creature_type;

// ---------------------------------------------------------------
// summoning spell
// ---------------------------------------------------------------
class t_summoning_spell : public t_combat_spell
{
public:
	t_summoning_spell( t_battlefield& battlefield, t_spell spell);

	virtual bool begin_casting();
	virtual bool cast_on( t_combat_creature_ptr caster, t_combat_creature_ptr target,
		                  int power, bool is_mirror );
	virtual void execute( t_combat_creature& caster );
	virtual t_combat_ai_action_list generate_combat_ai_action_list(t_combat_ai &owner);
	virtual double					get_cancel_weight( t_combat_creature const& target ) const;
protected:
	t_combat_creature_ptr m_creature;
};

inline
t_summoning_spell::t_summoning_spell( t_battlefield& battlefield, t_spell spell )
                 : t_combat_spell( battlefield, spell)
{
}

double get_summoning_value( t_combat_creature const& caster, t_combat_creature const& target,
							t_creature_type creature_type, int power );
bool place_summoned_creature( t_combat_creature const&	caster,
							  t_combat_creature*		creature );


#endif // SUMMONING_SPELL_H_INCLUDED